Blockchain provides data storage in a decentralized fashion, by having a network of nodes maintain and update the chain of blocks. Blockchain and other various computing operations require data transmission and processing among compilers, virtual machines (VMs), and other devices. A VM is a software emulation of a computer system based on computer architectures that provides functionality of a physical computer, and in the blockchain context, can be understood as a system designed to operate as a runtime environment for blockchain functions, such as blockchain contracts (also called smart contracts). When a user wants to perform an operation (e.g., deploying a smart contract, retrieving a state of the blockchain) to the blockchain, the user may program instructions on a client device in a high-level language source code and compile them with a corresponding compiler to produce a bytecode. The instructions may comprise functions that accept input parameters and generate output parameters. The bytecode may be passed to and executed by the VM to effectuate the operation.
In current solutions, several factors may prevent the VM from correctly initiating, obtaining, or performing operations to the parameters. For example, one or more input parameters may have complicated data structures such as pointer type variables. Each of the pointer type variables may store an address of another variable (e.g., an integer type variable, a Boolean type variable, a string type variable), at which the value of the another variable is stored. When the input parameters are compiled, the addresses stored in the pointer type variables may be shifted and become address shifts. If the complexity of the data structure of the parameters increases (e.g., as in a double pointer type parameter, as in multiple nested parameters with complex data structures), the shifts may become too strenuous to reverse, which prevents correct passing of the parameters into and out from the functions and hinders normal operation of the system. For another example, the VM and the compiler may have distinct word sizes. VMs are commonly found to be 32 bits, while the compilers and processors of client devices run at 64 bits. Such incompatibility may further cause confusion in memory address assignment and contribute to erroneous operations at the VMs.